<?php

// 学生认证通过

require $this->website['path']['action'] . '/admin/isedit.php';

$json = array('status' => 'ok', 'msg' => 'ok', 'data' => '');




$student = $this->website['class']['db']
                 ->table('user_student')
                 ->where('id=?',fn_post('id'))
                 ->one();


$id = $this->website['class']['db']
     ->table('user_student')
     ->field('status')
     ->value(1)
     ->where('id=?',fn_post('id'))
     ->limit(1)
     ->update();


if($id){
  $this->website['class']['db']
     ->table('user')
     ->field('isStudent')
     ->value(1)
     ->where('id=?',$student['uid'])
     ->limit(1)
     ->update();
}


$json['msg']='ok';





$this->json_encode($json);